﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CookComputing.XmlRpc;

namespace VH.SharePoint.Api.MetaWeblog
{
    public class MediaObject
    {
        [XmlRpcMember("name", Description = "Media file name")]
        public String FileName { get; set; }
        [XmlRpcMember("type", Description = "Media MIME type")]
        public String MimeType { get; set; }
        [XmlRpcMember("bits", Description = "Media base64-encoded binary data")]
        public Byte[] Media { get; set; }
        [XmlRpcMissingMapping(MappingAction.Ignore)]
        [XmlRpcMember("overwrite", Description = "Optional. Overwrite an existing media with the same name")]
        public Boolean Overwrite { get; set; }
    }

    public class MediaObjectInfo
    {
        [XmlRpcMember("id")]
        public String Id { get; set; }
        [XmlRpcMember("file", Description = "Media file name")]
        public String FileName { get; set; }
        [XmlRpcMember("url", Description = "Media absolute URL")]
        public String Url { get; set; }
        [XmlRpcMember("type", Description = "Media MIME type")]
        public String MimeType { get; set; }
    }

}
